package com.lzb.basic.dialog;

import android.content.Context;
import android.view.Gravity;
import android.view.View;

import androidx.annotation.NonNull;

import com.lzb.basic.R;
import com.lzb.basic.databinding.DialogPermissionExplainBinding;

public class PermissionExplainDialog extends BaseSmartDialog<DialogPermissionExplainBinding> implements View.OnClickListener {

    private String content;

    public PermissionExplainDialog(@NonNull Context context) {
        super(context);
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    protected boolean canceledOnTouchOutside() {
        return false;
    }

    @Override
    protected int getGravity() {
        return Gravity.TOP;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_permission_explain;
    }

    @Override
    protected void initView(View view) {
        mDataBinding.tvContent.setText(content);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
    }

    private Ilistener listener;

    public void setListener(Ilistener listener) {
        this.listener = listener;
    }

    public interface Ilistener {
        void clickConfirm();
    }
}
